package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.ProjectException;
import com.qijian.maindata.domain.query.ProjectExceptionQuery;
import com.qijian.maindata.domain.vo.CostCollectionReportVo;
import com.qijian.maindata.domain.vo.CostReportDetailPerformanceDto;
import com.qijian.maindata.domain.vo.ProjectExceptionVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 开工令异常Mapper接口
 *
 * @author qijian
 * @date 2023-09-28
 */
public interface ProjectExceptionMapper extends BaseMapper<ProjectException> {

    @Select("select count(0) from main_project_exception WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    ProjectExceptionVo getExceptionInfo(@Param("param") ProjectExceptionQuery query);

    ProjectExceptionVo getExceptionInfoByProjectId(@Param("projectId") Long projectId);

    List<CostCollectionReportVo> costCollectionReport(@Param("par") ProjectExceptionQuery query);

    int insertFinCostReport(CostReportDetailPerformanceDto costReportDetailPerformanceDto);
}
